package com.symria.system.constants;

import java.util.HashMap;
import java.util.Map;

public class Status {

	public enum PayStatus {
		  NO_PAY ("no_pay","未支付"),
		  PAY ("pay","已支付");
		  public static final Map<String, PayStatus> statusMap = new HashMap<String, PayStatus>();
			static {
				PayStatus[] statu = PayStatus.class.getEnumConstants();
			    for(PayStatus s:statu ) {
			    	statusMap.put(s.status.toString(), s);
			}
		  }
		  public static PayStatus fromValue(String status) {
			    return statusMap.get(status);
		  }
		  public static String valueToName(String status){
			  AppStatus s = AppStatus.fromValue(status);
			  return null==s?"":s.toName();
		  }
		  @Override
		  public String toString() {
				return this.status.toString();
		  }
		 
		  
		  public String toName(){
			  return this.name;
		  }
		  private String status;
		  private String name;
		  PayStatus(String status,String name) {
		    this.status = status;
		    this.name = name;
		  }
	}
}
